#include "contractor-delegate.h"
#include "contractor-delegate-queries.h"

ContractorDelegate::ContractorDelegate(QObject *parent) :
    StandardDatabaseDelegate(parent)
{
    m_nullIncluded = false;
    m_queries = new ContractorDelegateQueries(this);
}

void ContractorDelegate::setupInternalModel(QAbstractTableModel *model)
{
    for (int i = 0; i < model->rowCount(); i++)
    {
        QString correctedData = model->index(i, 1).data().toString();
        model->setData(model->index(i, 1), correctedData, Qt::DisplayRole);
    }
    for (int i = model->columnCount()-1; i > 1; i--)
        model->removeColumn(i);
}
